// People.cpp : implementation file
// Download by http://www.NewXing.com

#include "stdafx.h"
#include "AddressList.h"
#include "People.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPeople

IMPLEMENT_DYNAMIC(CPeople, CRecordset)

CPeople::CPeople(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CPeople)
	m_id = 0;
	m_groupId = 0;
	m_fullName = _T("");
	m_sex = FALSE;
	m_company = _T("");
	m_phoneInCompany = _T("");
	m_homeAddress = _T("");
	m_phineInHome = _T("");
	m_mobile = _T("");
	m_mail = _T("");
	m_qq = _T("");
	m_msn = _T("");
	m_memory = _T("");
	m_nFields = 13;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}


CString CPeople::GetDefaultConnect()
{
	return _T("ODBC;DSN=address");
}

CString CPeople::GetDefaultSQL()
{
	return _T("[people]");
}

void CPeople::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CPeople)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Long(pFX, _T("[id]"), m_id);
	RFX_Long(pFX, _T("[groupId]"), m_groupId);
	RFX_Text(pFX, _T("[fullName]"), m_fullName);
	RFX_Bool(pFX, _T("[sex]"), m_sex);
	RFX_Text(pFX, _T("[company]"), m_company);
	RFX_Text(pFX, _T("[phoneInCompany]"), m_phoneInCompany);
	RFX_Text(pFX, _T("[homeAddress]"), m_homeAddress);
	RFX_Text(pFX, _T("[phineInHome]"), m_phineInHome);
	RFX_Text(pFX, _T("[mobile]"), m_mobile);
	RFX_Text(pFX, _T("[mail]"), m_mail);
	RFX_Text(pFX, _T("[qq]"), m_qq);
	RFX_Text(pFX, _T("[msn]"), m_msn);
	RFX_Text(pFX, _T("[memory]"), m_memory);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CPeople diagnostics

#ifdef _DEBUG
void CPeople::AssertValid() const
{
	CRecordset::AssertValid();
}

void CPeople::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG
